<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>产品列表 - API测试</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <style>
        .container {
            margin-top: 2rem;
        }
        .table-responsive {
            margin-top: 1rem;
        }
        .action-buttons {
            display: flex;
            gap: 0.5rem;
        }
        .header-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        .product-image {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 4px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header-actions">
            <h1>产品管理</h1>
            <a href="create.html" class="btn btn-primary">新建产品</a>
        </div>

        <!-- 数据列表区域 -->
        <div class="table-responsive">
            <table class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>封面图</th>
                        <th>名称</th>
                        <th>分类ID</th>
                        <th>价格</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="dataTableBody">
                    <tr><td colspan="7" class="text-center">加载中...</td></tr>
                </tbody>
            </table>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script type="module" src="../js/api.js"></script>
    <script type="module" src="js/list.js"></script>
</body>
</html>